﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style TargetType="{x:Type Button}" x:Key="TicketLinkButton">
        <Setter Property="Foreground" Value="#FF91A3CF"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <TextBlock x:Name="TicketLink" Text="{Binding Name}" Foreground="{TemplateBinding Foreground}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="TicketLink" Property="TextDecorations" Value="Underline"/>
                            <Setter TargetName="TicketLink" Property="Cursor" Value="Hand"/>
                            <Setter TargetName="TicketLink" Property="Foreground" Value="#FF1A2E5E"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <DataTemplate x:Key="EditTicketTemplate">
        <Button Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}},Path=DataContext.OpenTicketCommand}" CommandParameter="{Binding}" Content="{Binding Name}" Style="{StaticResource TicketLinkButton}" />
    </DataTemplate>
    
</ResourceDictionary>